// 公共类型
interface commonType {
  code: number
  message: string
  ok: boolean
}

// 获取订单数据类型接口
export interface orderInfoType {
  id: number
  createTime: string
  updateTime: string
  isDeleted: number
  param: {
    orderStatusString: string
  }
  userId: number
  outTradeNo: string
  hoscode: string
  hosname: string
  depcode: string
  depname: string
  scheduleId: string
  title: string
  reserveDate: string
  reserveTime: number
  patientId: number
  patientName: string
  patientPhone: string
  hosRecordId: string
  number: number
  fetchTime: string
  fetchAddress: string
  amount: number
  quitTime: string
  orderStatus: number
}

interface OrderInfo extends commonType {
  data: orderInfoType
}

export interface responseOrderInfoType {
  data: OrderInfo
}

// 获取订单状态数据
export interface orderStatusType {
  comment: string
  status: number
}

interface orderStatus extends commonType {
  data: orderStatusType[]
}
export interface responseOrderStatusType {
  data: orderStatus
}

// 下单，获取微信二维码
export interface weixinPayType {
  codeUrl: string
  orderId: number
  totalFee: number
  resultCode: string
}

interface weixinPay extends commonType {
  data: weixinPayType
}

export interface responseWeixinPayType {
  data: weixinPay
}

// 获取订单分页列表数据
interface Param {
  orderStatusString: string
}

interface Record {
  id: number
  createTime: string
  updateTime: string
  isDeleted: number
  param: Param
  userId: number
  outTradeNo: string
  hoscode: string
  hosname: string
  depcode: string
  depname: string
  scheduleId: any // 根据实际情况指定 scheduleId 的类型
  title: string
  reserveDate: string
  reserveTime: number
  patientId: number
  patientName: string
  patientPhone: string
  hosRecordId: string
  number: number
  fetchTime: string
  fetchAddress: string
  amount: number
  quitTime: string
  orderStatus: number
}

export interface orderListType {
  records: Record[]
  total: number
  size: number
  current: number
  orders: any[] // 根据实际情况指定 orders 的类型
  hitCount: boolean
  searchCount: boolean
  pages: number
}

interface OrderList extends commonType {
  data: orderListType
}

export interface responseOrderListType {
  data: OrderList
}

// 订单分页列表请求参数
export interface resOrderList {
  userId?: number | string
  outTradeNo?: string
  patientId?: number | string
  patientName?: string
  keyword?: string
  orderStatus?: string
  reserveDate?: string
  createTimeBegin?: string
  createTimeEnd?: string
}
